package main

import "fmt"

// merge type declaration
func f(p1,p2 string)string{
	return p1+"/"+p2
}

// omit return value
func g()(result string,err error){
	return
}

// variable arguments
func printIntArr(name string,values...int){
	fmt.Printf("Array %s = [ ",name)
	for _,value:=range values{
		fmt.Printf("%d ",value)
	}
	fmt.Println("]")
}

func main(){
	// alias function type
	type F func(p1 string,p2 string)string
	var (
		f1 F
		f2 F
	)
	fmt.Println(f1 == nil)
	f1=f
	f2=func(p1 string,p2 string)(result string){
		result=p1+" "+p2
		return
	}
	fmt.Println(f2("Hello","World"))
	fmt.Println(f1("Yes","No"))
	fmt.Println(func()string{
		return "Good Job!"
	}())
	printIntArr("Demo",[]int{1,2,3,4,5}...)
}